package com.smartstate.IOC.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smartstate.IOC.entity.AssetSituation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AssetSituationMapper extends BaseMapper<AssetSituation> {

    @Select("<script> \n" +
            "select assetType, assetName, assetNumber, assetWorth from asset_situation where 1=1 \n" +
            "<if test= \" type !=null and type!='' \">\n" +
            "  and assetType = #{type}\n" +
            "</if>\n" +
            "</script>")
    List<AssetSituation> getAssetSituationByType(@Param("type")String type);

}
